/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package chemins.pack;

import accueil.pack.Menu;
import accueil.pack.SousMenu;
import android.R.layout;
import chemin.pack.R;
import android.app.ActionBar.LayoutParams;
import android.app.Activity;
import android.content.Context;

import android.util.Log;
import android.view.SurfaceView;

import android.widget.*;

import java.io.File;
import java.io.FilenameFilter;



/**
 *
 * @author isen
 */
public class MyMediaPlayer extends Activity{

    File[] listeFichierMP4;
    //,listeFichierPNG;

    VideoView[] listeVideos;
    LinearLayout[] listeBlocs,listeSampleContainers;
    ImageView[] listeImages;
    TextView[] listeTitres;
    
    int index = 0,mainVideoIndex = 0;
    float videoSampleXInit;
    
    VideoView mainVideo,video1,video2,video3,videoTest;
    boolean video1prepared,video2prepared,video3prepared;
    
    Context context;
    
    public MyMediaPlayer() {
        
        listerMP4();
        //listerPNG();
        listeVideos = new VideoView[listeFichierMP4.length];
        listeImages = new ImageView[listeFichierMP4.length];
        listeTitres = new TextView[listeFichierMP4.length];
        
        listeBlocs = new LinearLayout[listeFichierMP4.length*3];
        listeSampleContainers = new LinearLayout[listeFichierMP4.length];
    }
    
    
    
    public void listerMP4()
    {
        
        File repertoire = new File("/mnt/storage/App Chemin/MediaPlayer");
        listeFichierMP4 = repertoire.listFiles(new FilenameFilter() {
                                public boolean accept(File file, String fileName) {
                                        return fileName.endsWith(".mp4");
                                    }
                            });
       
        
        
    }
    /*
     * public void listerPNG()
    {
        
        File repertoire = new File("/mnt/storage/App Chemin/");
        listeFichierPNG = repertoire.listFiles(new FilenameFilter() {
                                public boolean accept(File file, String fileName) {
                                        return fileName.endsWith(".png");
                                    }
                            });
       
        
        
    }
    * 
    */


    
    
    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
    
    
}


